home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
Graphics
/
Icons
/
BlackIcons
/
BlackIcons.sh
next >
Wrap
Linux/UNIX/POSIX Shell Script
|
1995-06-12
|
4KB
|
117 lines
#!/bin/sh
#
# Written by Annard Brouwer <annard@stack.urc.tue.nl> NeXTmail OK
# Date: Sun Feb 12 18:35:09 MET 1995
#
# USAGE:
# This script must be run as root.
# It will replace all white icons which have been changed in NS3.3 with the nice old
# black ones we were used to before all that ugly PC/HP/Sun hardware on the market
# today was able to support NeXTstep.
#
# SECURITY:
# The protection of Terminal, PrintManager and HostManager is the default
# protection as installed by default. You might have to change this script to
# accomodate security restrictions at your site.
#
# WARNING!
# If you don't trust this script please read it carefully, I will and can not guarantee
# that it works flawlessly so keep a backup copy of your installation CD-ROM at hand.
# A backup copy of the executables which have been changed can be found in TMPDIR.
#
INSTALLDIR=`pwd`
WSDIR=/usr/lib/NextStep/Workspace.app
WMDIR=${WSDIR}/WM.app
PMDIR=/NextApps/PrintManager.app
HMDIR=/NextAdmin/HostManager.app
TMDIR=/NextApps/Terminal.app
PFDIR=/NextApps/Preferences.app
TMPDIR=/tmp/root
# All files created should only be readable by everyone.
umask 222
test X`/usr/ucb/whoami` = X"root" || (echo You must be root to run this script.; exit 1)
echo "This script will change the white icons to black ones in the following applications:"
echo " Workspace, WM, Terminal, Preferences, HostManager."
echo "If you have changed your mind press ctrl-c now!"
sleep 10
# Let's make a protected temporary directory.
mkdir ${TMPDIR}
chmod 700 ${TMPDIR}
# Now we will change icons in the Workspace area:
echo "Changing Workspace icons..."
cd ${INSTALLDIR}/Workspace
cp application.tiff ${WSDIR}/application.tiff
cp daemon.tiff ${WSDIR}/daemon.tiff
cp mysteryApplication.tiff ${WSDIR}/mysteryApplication.tiff
cp unix.tiff ${WSDIR}/unix.tiff
# And change icons in the WM area:
cp defaultAppIcon.tiff ${WMDIR}/defaultAppIcon.tiff
cp defaultDaemonIcon.tiff ${WMDIR}/defaultDaemonIcon.tiff
cp defaultUnixIcon.tiff ${WMDIR}/defaultUnixIcon.tiff
cp mysteryApplication.tiff ${WMDIR}/mysteryApplication.tiff
cp openRoot.tiff ${WMDIR}/openRoot.tiff
cp root.tiff ${WMDIR}/root.tiff
# Watch out! This is a scary bit! We have to change an icon in the WM Mach-O file.
echo "Changing WM..."
cp -p ${WMDIR}/WM ${TMPDIR}/WM.dist
segedit ${WMDIR}/WM -replace __ICON bundle bundle.tiff -output ${TMPDIR}/WM
mv ${TMPDIR}/WM ${WMDIR}/WM
chown root ${WMDIR}/WM
chgrp wheel ${WMDIR}/WM
chmod 755 ${WMDIR}/WM
cd ${INSTALLDIR}
# Watch out! This is a scary bit! We have to change an icon in the
# PrintManager Mach-O file.
echo "Changing PrintManager..."
cp -p ${PMDIR}/PrintManager ${TMPDIR}/PrintManager.dist
segedit ${PMDIR}/PrintManager -replace __ICON app PrintManager.tiff -output ${TMPDIR}/PrintManager
mv ${TMPDIR}/PrintManager ${PMDIR}/PrintManager
chown root ${PMDIR}/PrintManager
chgrp wheel ${PMDIR}/PrintManager
chmod 6755 ${PMDIR}/PrintManager
# Watch out! This is a scary bit! We have to change an icon in the
# HostManager Mach-O file.
echo "Changing HostManager..."
cp -p ${HMDIR}/HostManager ${TMPDIR}/HostManager.dist
segedit ${HMDIR}/HostManager -replace __ICON app HostManager.tiff -output ${TMPDIR}/HostManager
mv ${TMPDIR}/HostManager ${HMDIR}/HostManager
chown root ${HMDIR}/HostManager
chgrp wheel ${HMDIR}/HostManager
chmod 4755 ${HMDIR}/HostManager
cp HostManager.tiff ${HMDIR}/HostMan.tiff
# Watch out! This is a scary bit! We have to change an icon in the
# Terminal Mach-O file.
echo "Changing Terminal..."
cp -p ${TMDIR}/Terminal ${TMPDIR}/Terminal.dist
segedit ${TMDIR}/Terminal -replace __ICON app Terminal.tiff -output ${TMPDIR}/Terminal
mv ${TMPDIR}/Terminal ${TMDIR}/Terminal
chown root ${TMDIR}/Terminal
chgrp wheel ${TMDIR}/Terminal
chmod 4755 ${TMDIR}/Terminal
cp Terminal.tiff ${TMDIR}/icon.tiff
# Let's change the Preferences' icons:
echo "Changing Preferences icons..."
cd ${INSTALLDIR}/Preferences
cp Keyboard.tiff ${PFDIR}/Keyboard.preferences/Keyboard.tiff
cp Monitor.tiff ${PFDIR}/Monitor.preferences/Monitor.tiff
cp Mouse.tiff ${PFDIR}/Mouse.preferences/Mouse.tiff
cp lefthand.tiff ${PFDIR}/Mouse.preferences/English.lproj/Mouse.nib/lefthand.tiff
cp righthand.tiff ${PFDIR}/Mouse.preferences/English.lproj/Mouse.nib/righthand.tiff
cp Screen.tiff ${PFDIR}/Screen.preferences/Screen.tiff
cd ${INSTALLDIR}
echo "Everything has been patched. Remember to remove ${TMPDIR}!"